package com.xl.observer.special;


public class ConcreateWeatherObserver implements WeatherObserver {

    private String observerName;

    @Override
    public void update(WeatherSubject ws) {
        System.out.println(observerName + " 收到 " + ((ConcreateWeatherSubject)ws).getWeather() + " 天气");
    }

    @Override
    public void setObserverName(String name) {
        this.observerName = name;
    }

    @Override
    public String getObserverName() {
        return this.observerName;
    }


}
